From: Keir Fraser Date: Mon, 18 Apr 2011 04:01:19 +0000 (+0100) Subject: hvmloader: Fix build dependency (rombios.o depends on roms.inc) X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9074aedd52560885193ab82247335f5ba2cdc52d;p=xen.git hvmloader: Fix build dependency (rombios.o depends on roms.inc) Also, generate roms.inc file in a scratch location and then move in place. This is more reliable if make is terminated at an arbitrary point. Signed-off-by: Keir Fraser --- diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index 87c8d0e324..9f121a469f 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -54,7 +54,7 @@ endif all: subdirs-all $(MAKE) hvmloader -hvmloader.o: roms.inc +rombios.o hvmloader.o: roms.inc smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(shell date +%m/%d/%Y)\"" hvmloader: $(OBJS) acpi/acpi.a @@ -63,32 +63,34 @@ hvmloader: $(OBJS) acpi/acpi.a rm -f hvmloader.tmp roms.inc: $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) ../etherboot/eb-roms.h - echo "/* Autogenerated file. DO NOT EDIT */" > roms.inc + echo "/* Autogenerated file. DO NOT EDIT */" > $@.new ifneq ($(ROMBIOS_ROM),) - echo "#ifdef ROM_INCLUDE_ROMBIOS" >> roms.inc - sh ./mkhex rombios $(ROMBIOS_ROM) >> roms.inc - echo "#endif" >> roms.inc + echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new + sh ./mkhex rombios $(ROMBIOS_ROM) >> $@.new + echo "#endif" >> $@.new endif ifneq ($(STDVGA_ROM),) - echo "#ifdef ROM_INCLUDE_VGABIOS" >> roms.inc - sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> roms.inc - echo "#endif" >> roms.inc + echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new + sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new + echo "#endif" >> $@.new endif ifneq ($(CIRRUSVGA_ROM),) - echo "#ifdef ROM_INCLUDE_VGABIOS" >> roms.inc - sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> roms.inc - echo "#endif" >> roms.inc + echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new + sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new + echo "#endif" >> $@.new endif - echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> roms.inc - cat ../etherboot/eb-roms.h >> roms.inc - echo "#endif" >> roms.inc + echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new + cat ../etherboot/eb-roms.h >> $@.new + echo "#endif" >> $@.new + + mv $@.new $@ .PHONY: clean clean: subdirs-clean - rm -f roms.inc acpi.h + rm -f roms.inc roms.inc.new acpi.h rm -f hvmloader hvmloader.tmp *.o $(DEPS) -include $(DEPS)